<template>
	<view class="dynamics">
		<view class="" :style="{'height': systemBarHeight*2+'rpx'}">
			
		</view>
		<DynamicsSearch :systemBarHeight="systemBarHeight*2"></DynamicsSearch>
		<view class="share-album">
			<view class="profile-picture">
				<image src="/static/icon/圆用户.png" mode=""></image>
			</view>
			<text class="title">
				共享我的相册
			</text>
		</view>
		<DynamicsList></DynamicsList>
		<ShopCar></ShopCar>
		<!-- <view class="shop-car">
			<uni-badge class="shop-car-badge" text="1" type="error" :is-dot="true" absolute="rightTop" size="normal">
				<view class="shop-car-icon">
					<image src="/static/icon/购物车.png" mode=""></image>
				</view>
			</uni-badge>
		</view> -->
	</view>
</template>

<script>
	import DynamicsSearch from "../../components/dynamics/search/index.vue"
	import DynamicsList from "../../components/dynamics/list/index.vue"
	import ShopCar from "../../components/ShopCar/ShopCar.vue"
	export default {
		created() {
			this.getSystemBarHeight()
		},
		data() {
			return {
				systemBarHeight: 0 //系统状态栏高度
			}
		},
		methods: {
			getSystemBarHeight() {
				uni.getSystemInfo({
					success: (res) => {
						this.systemBarHeight = res.statusBarHeight
					}
				})
			}
		},
		onLoad() {
			uni.setTabBarItem({
				index: 1,
				text: "动态"
			})
		},
		components: {
			DynamicsSearch,
			DynamicsList
		}
	}
</script>

<style lang="scss" scoped>
	.dynamics {
		padding: 0 4rpx;
		position: relative;
		.share-album {
			width: 356rpx;
			height: 96rpx;
			background-color: #f8f8f8;
			margin-top: 20rpx;
			border-radius: 50rpx;
			margin: 0 auto;
			display: flex;
			align-items: center;
			justify-content: space-around;
			font-size: 36rpx;
			position: relative;
			left: 20rpx;
			top: 30rpx;
		}
		.profile-picture {
			width: 60rpx;
			height: 60rpx;
			background-color: #f2f2f2;
			border-radius: 50%;
			image {
				width: 100%;
				height: 100%;
			}
		}
	}
</style>
